Optimal. Leaf size=65 \[ \frac {i \sec (c+d x)}{3 d (a+i a \tan (c+d x))^2}+\frac {i \sec (c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3583, 3569}
\begin {gather*} \frac {i \sec (c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {i \sec (c+d x)}{3 d (a+i a \tan (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3569
Rule 3583
Rubi steps
\begin {align*} \int \frac {\sec (c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=\frac {i \sec (c+d x)}{3 d (a+i a \tan (c+d x))^2}+\frac {\int \frac {\sec (c+d x)}{a+i a \tan (c+d x)} \, dx}{3 a}\\ &=\frac {i \sec (c+d x)}{3 d (a+i a \tan (c+d x))^2}+\frac {i \sec (c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 38, normalized size = 0.58 \begin {gather*} \frac {\sec (c+d x) (-2 i+\tan (c+d x))}{3 a^2 d (-i+\tan (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.36, size = 57, normalized size = 0.88
method | result | size |
risch | \(\frac {i {\mathrm e}^{-i \left (d x +c \right )}}{2 a^{2} d}+\frac {i {\mathrm e}^{-3 i \left (d x +c \right )}}{6 a^{2} d}\) | \(38\) |
derivativedivides | \(\frac {-\frac {4}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {2 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {2}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{2} d}\) | \(57\) |
default | \(\frac {-\frac {4}{3 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {2 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {2}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{2} d}\) | \(57\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 45, normalized size = 0.69 \begin {gather*} \frac {i \, \cos \left (3 \, d x + 3 \, c\right ) + 3 i \, \cos \left (d x + c\right ) + \sin \left (3 \, d x + 3 \, c\right ) + 3 \, \sin \left (d x + c\right )}{6 \, a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 30, normalized size = 0.46 \begin {gather*} \frac {{\left (3 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-3 i \, d x - 3 i \, c\right )}}{6 \, a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 112 vs. \(2 (51) = 102\).
time = 0.56, size = 112, normalized size = 1.72 \begin {gather*} \begin {cases} \frac {\tan {\left (c + d x \right )} \sec {\left (c + d x \right )}}{3 a^{2} d \tan ^{2}{\left (c + d x \right )} - 6 i a^{2} d \tan {\left (c + d x \right )} - 3 a^{2} d} - \frac {2 i \sec {\left (c + d x \right )}}{3 a^{2} d \tan ^{2}{\left (c + d x \right )} - 6 i a^{2} d \tan {\left (c + d x \right )} - 3 a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \sec {\left (c \right )}}{\left (i a \tan {\left (c \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.63, size = 47, normalized size = 0.72 \begin {gather*} \frac {2 \, {\left (3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2\right )}}{3 \, a^{2} d {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.51, size = 79, normalized size = 1.22 \begin {gather*} -\frac {2\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,3{}\mathrm {i}+3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-2{}\mathrm {i}\right )}{3\,a^2\,d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,1{}\mathrm {i}-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,3{}\mathrm {i}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________